package com.g2.admin.model.po;

import java.util.Date;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 用户登录日志表
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "user_login")
public class UserLoginPo implements Serializable {
	private static final long serialVersionUID = -958187905958297200L;

	@ApiModelProperty(value = "登录时间")
	private Date createTime;
	@TableId(value = "id", type = IdType.AUTO)
    private Long id;
	@ApiModelProperty(value = "ip")
	private String ip;
	@ApiModelProperty(value = "类型：1、登录；2、手动登出；3、自动登出。")
	private Integer loginType;
	@ApiModelProperty(value = "单位ID，所属单位，管理员则为空")
	private Long orgId;
	@ApiModelProperty(value = "单位名称")
	private String orgName;
	@ApiModelProperty(value = "关联ID（如果有其他扩展角色，可以利用此字段关联）")
	private Long relationId;
	@ApiModelProperty(value = "用户类型：1、管理员；2、业务员。")
	private Integer type;
	@ApiModelProperty(value = "用户ID")
	private Long userId;
	@ApiModelProperty(value = "用户名")
	private String username;
}